<?php
$val	= explode("-",$value["TGL_LAHIR"]);
if((date("m") - $val[1]) >= 0){
	if((date("m")- $val[1]) == 0){
		if((date("d") - $val[2]) >= 0){
			$age	= date("Y") - $val[0];
		} else {
			$age	= date("Y") - $val[0] - 1;
			if($age < 0){
				$age = 0;
			}
		}
	} else {
		$age	= date("Y") - $val[0];
	}
} else {
	$age	= date("Y") - $val[0] - 1;
	if($age < 0){
		$age = 0;
	}
}
?>
<table>
	<tr>
		<td>Nomor Registrasi</td>
		<td>: <?php echo $value["NO_REG"]; ?></td>
	</tr>
	<tr>
		<td>Nama Pasien</td>
		<td>: <?php echo $value["NAMA_PASIEN"]; ?></td>
	</tr>
	<tr>
		<td>Jenis Kelamin</td>
		<td>: <?php echo $value["JENIS_KELAMIN"] == 1 ? "Laki - Laki" : "Perempuan"; ?></td>
	</tr>
	<tr>
		<td>Alamat</td>
		<td>: <?php echo strip_tags($value["ALAMAT"]); ?></td>
	</tr>
	<tr>
		<td>Tanggal Daftar</td>
		<td>: <?php echo $tgl_daftar; ?></td>
	</tr>
	<tr>
		<td>Tanggal Lahir</td>
		<td>: <?php echo $tgl_lahir; ?></td>
	</tr>
	<tr>
		<td>Umur</td>
		<td>: <?php echo $age." tahun"; ?></td>
	</tr>
</table>